/**
 * 
 */
$(document).ready(function() {
	
	$('#login').click(function(){
		var id = $("#id").val();
		var password = $("#password").val();
		var verify1 = $("#verify1").val();
		var verify2 = $("#verify2").val();
		if(id == "" || id == null){
			alert("账号不能为空");
			return;
		}
		if(password == "" || password == null){
			alert("密码不能为空");
			return;
		}
		if(verify1 == "" || verify1 == null){
			alert("验证码不能为空");
			return;
		}
		if(verify2 != verify1){
			alert("验证码错误");
			return;
		}
//		$.get(
//			"initAdmin",
//			{"id":id,"password":password},
//			function(result){
//				if(result == "administrator")
//					window.location.href = administrator.jsp;
//			}
//		)+"&verify"+verify
		$.get(
			"index/logout",
			function(){
				window.location.href="initAdmin?id="+id+"&password="+password;
			}
		)
	});
});